﻿<!--#INCLUDE FILE="config.asp"-->

<%
if(Session("AdminAccessLevel") <> 1 and Session("AdminAccessLevel") <> 3) then
	Response.Redirect("admin-login.asp?msg=invalid")
end if

' Endcrypt information of CC
Set objEncrypter = Server.CreateObject ("Hyeongryeol.StringEncrypter")
objEncrypter.Key = edCode
objEncrypter.InitialVector = conIV

encryptNombreCard = objEncrypter.Encrypt (Request("NombreCredit"))
encryptTipo = objEncrypter.Encrypt (Request("Tipo"))
encryptNumerodeTarjetaCard = objEncrypter.Encrypt (Request("NumeroDeTarjeta") )
encryptCodigodeSeguridad = objEncrypter.Encrypt (Request("CodigoDeSeguridad") )

' Add record to Travels

	numeroTotaldeInvitados = Request("NumeroTotaldeInvitados")
	numerodeNinos = Request("NumerodeNinos")
	NombresdeAcompanantes = Request("NombresdeAcompanantes")
	detallesdeHabitacion = Request("DetallesdeHabitacion")
	actividades = Request("Actividades")
	arrival1 = Request("arrival1")
	departure1 = Request("departure1")
	arrival2 = Request("arrival2")
	departure2 = Request("departure2")
	
' Add record to Transport

	Legada_Aereolinea = Request("Aereolinea")
	Legada_Aereopuerto = Request("Aereopuerto")
	Legada_NecesitanTransporte = Request("NecesitanTransporte")
	HoraAproximadadellegada = Request("Horadellegada")
	Notas = Request("Notas")
	InforamacionPendiente = Request("InforamacionPendiente")

' Add record to Guests
	Nombre = Request("name")
	Segundo_Nombre = Request("mName")
	Apellido = Request("sName")
	Telefono = Request("phone")
	email = Request("email")
	Idioma = Request("Idioma")
	Direccion1 = Request("address1")
	Direccion2 = Request("address2")
	Ciudad = Request("Ciudad")
	Stado = Request("Stado")
	Postal = Request("Postal")
	Pais = Request("Pais")
	Comunicasion = Request("Comunicasion")
	
	' check value of Checkbox Confirm
	value = Request("checkClientSerious")
	reservation = Request("Reservationcode")
	
	if (value = "") then 
		valueOfCheckbox = 0
	else
		valueOfCheckbox = 1
	end if
	
	if (reservation = "") then
		reservation = ""
	end if
' Add record to Credits
	
	set objConnect = server.createObject("ADODB.Connection")       
		objConnect.open conStr
		
	Set oCmd = Server.CreateObject("ADODB.Command")
		  
		    oCmd.ActiveConnection = objConnect
			oCmd.CommandText = "sp_update_profile_Guests" 
			oCmd.CommandType = 4
			
			' ****************
			' Guests Parameters
			' ****************
			Set Title = oCmd.CreateParameter("@title", 200,1,100,Request("Title"))
			oCmd.Parameters.Append Title
			
			Set Nombre = oCmd.CreateParameter("@name", 200,1,100,Nombre)
			oCmd.Parameters.Append Nombre
			
			Set Segundo_Nombre = oCmd.CreateParameter("@middle", 200,1,100,Segundo_Nombre)
			oCmd.Parameters.Append Segundo_Nombre
			
			Set Apellido = oCmd.CreateParameter("@surname", 200,1,100,Apellido)
			oCmd.Parameters.Append Apellido
			
			Set Telefono = oCmd.CreateParameter("@phone", 200,1,100,Telefono)
			oCmd.Parameters.Append Telefono
			
			Set email = oCmd.CreateParameter("@email", 200,1,100,email)
			oCmd.Parameters.Append email
			
			Set Idioma = oCmd.CreateParameter("@languageID", 3,1,100,Idioma)
			oCmd.Parameters.Append Idioma
			
			Set Direccion1 = oCmd.CreateParameter("@address1", 200,1,100,Direccion1)
			oCmd.Parameters.Append Direccion1
			
			Set Direccion2 = oCmd.CreateParameter("@address2", 200,1,100,Direccion2)
			oCmd.Parameters.Append Direccion2
			
			Set Ciudad = oCmd.CreateParameter("@city", 200,1,100,Ciudad)
			oCmd.Parameters.Append Ciudad
			
			Set Stado = oCmd.CreateParameter("@province", 200,1,100,Stado)
			oCmd.Parameters.Append Stado
			
			Set Postal = oCmd.CreateParameter("@zip", 200,1,100,Postal)
			oCmd.Parameters.Append Postal
			
			Set Pais = oCmd.CreateParameter("@country", 200,1,100,Pais)
			oCmd.Parameters.Append Pais
			
			Set Comunicasion = oCmd.CreateParameter("@communication", 200,1,100,Comunicasion)
			oCmd.Parameters.Append Comunicasion
			
			
			' *******************
			' Transport Parameter
			' *******************
			
			Set Legada_Aereolinea = oCmd.CreateParameter("@ArrivalAirlineID", 3,1,100,Legada_Aereolinea)
			oCmd.Parameters.Append Legada_Aereolinea
			
			Set Legada_Aereopuerto = oCmd.CreateParameter("@ArrivalAirportID", 3,1,100,Legada_Aereopuerto)
			oCmd.Parameters.Append Legada_Aereopuerto
			
			Set Legada_NecesitanTransporte = oCmd.CreateParameter("@ArrivalNeedTransport", 3,1,100,Legada_NecesitanTransporte)
			oCmd.Parameters.Append Legada_NecesitanTransporte
			
			Set HoraAproximadadellegada = oCmd.CreateParameter("@ApproximateArrivalTime", 200,1,100,HoraAproximadadellegada)
			oCmd.Parameters.Append HoraAproximadadellegada
			
			Set Notas = oCmd.CreateParameter("@Notes", 200,1,100,Notas)
			oCmd.Parameters.Append Notas
			
			Set InforamacionPendiente = oCmd.CreateParameter("@InformationPending", 200,1,100,InforamacionPendiente)
			oCmd.Parameters.Append InforamacionPendiente
			
			' ********************
			' Travels 1
			' **********************
			Dim arrival11,departure11,arrival21,departure21,totalNumberGuests1,namesOfChaperones1,roomDetail1,actividades1,numberChildren1,travelID1
			
			' temp parameters to check any changed of fechas
			' if temp = 0 => no changed, temp = 1 => fecha 1 changed, temp = 2 => fecha 2 changed, temp = 3 => both of fecha changed
			Dim travel1changed, travel2changed, travel3changed, travel4changed

			IF (Request("travelID_1")= "") Then 
				arrival11 = " "
				departure11 = " "
				arrival21 = " "
				departure21 = " "
				totalNumberGuests1 = 0
				namesOfChaperones1 = " "
				roomDetail1 = " "
				actividades1 = " "
				numberChildren1 = 0
				travelID1 = " "
			else 
				arrival11 = Request("arrival1_1")
				if (arrival11 = "") then
					arrival11 = ""
				end if
				
				departure11 = Request("departure1_1")
				if (departure11 = "") then
					departure11 = ""
				end if
				
				arrival21 = Request("arrival2_1")
				if (arrival21 = "") then
					arrival21 = ""
				end if
				
				departure21 = Request("departure2_1")
				if (departure21 = "") then
					departure21 = ""
				end if
			
				arrivalOri11 = Request("arrivalOri1_1")
				departureOri11 = Request("departureOri1_1")
				arrivalOri21 = Request("arrivalOri2_1")
				departureOri21 = Request("departureOri2_1")
				
				if ((arrival11 <> arrivalOri11 or departure11 <> departureOri11) and arrival21 = arrivalOri21 and departure21 = departureOri21) then
					travel1changed = 1
				elseif ((arrival11 = arrivalOri11 and departure11 = departureOri11) and (arrival21 <> arrivalOri21 or departure21 <> departureOri21)) then
					travel1changed = 2
				elseif ((arrival11 <> arrivalOri11 or departure11 <> departureOri11) and (arrival21 <> arrivalOri21 or departure21 <> departureOri21)) then
					travel1changed = 3
				else 
					travel1changed = 0
				end if
				
				totalNumberGuests1 = Request("NumeroTotaldeInvitados_1")
				namesOfChaperones1 = Request("NombresdeAcompanantes_1")
				roomDetail1 = Request("DetallesdeHabitacion_1")
				actividades1 = Request("Actividades_1")
				numberChildren1 = Request("NumerodeNinos_1")
				travelID1 = Request("travelID_1")
			end if
			
			Set arrival1_1 = oCmd.CreateParameter("@arrival1_1", 200,1,100,arrival11)
			oCmd.Parameters.Append arrival1_1
			
			Set departure1_1 = oCmd.CreateParameter("@departure1_1", 200,1,100,departure11)
			oCmd.Parameters.Append departure1_1
			
			Set arrival2_1 = oCmd.CreateParameter("@arrival2_1", 200,1,100,arrival21)
			oCmd.Parameters.Append arrival2_1
			
			Set departure2_1 = oCmd.CreateParameter("@departure2_1", 200,1,100,departure21)
			oCmd.Parameters.Append departure2_1
			
			Set totalNumberGuests_1 = oCmd.CreateParameter("@totalNumberGuests_1", 3,1,100,totalNumberGuests1)
			oCmd.Parameters.Append totalNumberGuests_1
			
			Set namesOfChaperones_1 = oCmd.CreateParameter("@namesOfChaperones_1", 200,1,100,namesOfChaperones1)
			oCmd.Parameters.Append namesOfChaperones_1

			Set roomDetail_1 = oCmd.CreateParameter("@roomDetail_1", 200,1,100,roomDetail1)
			oCmd.Parameters.Append roomDetail_1
			
			Set actividades_1 = oCmd.CreateParameter("@actividades_1", 200,1,100,actividades1)
			oCmd.Parameters.Append actividades_1
			
			Set numberChildren_1 = oCmd.CreateParameter("@numberChildren_1", 3,1,100,numberChildren1)
			oCmd.Parameters.Append numberChildren_1
			
			Set travelID_1 = oCmd.CreateParameter("@travelID_1", 200,1,100,travelID1)
			oCmd.Parameters.Append travelID_1
			
			Set travelID_1_checkChanged = oCmd.CreateParameter("@travelID_1_checkChanged", 3,1,100,travel1changed)
			oCmd.Parameters.Append travelID_1_checkChanged
			
			' ********************
			' Travels 2
			' **********************
			
			Dim arrival12,departure12,arrival22,departure22,totalNumberGuests2,namesOfChaperones2,roomDetail2,actividades2,numberChildren2,travelID2
			
			IF (Request("travelID_2") = "") Then 
				arrival12 = " "
				departure12 = " "
				arrival22 = " "
				departure22 = " "
				totalNumberGuests2 = 0
				namesOfChaperones2 = " "
				roomDetail2 = " "
				actividades2 = " "
				numberChildren2 = 0
				travelID2 = " "
				travel2changed = 0
			else 
				arrival12 = Request("arrival1_2")
				if (arrival12 = "") then
					arrival12 = ""
				end if
				
				departure12 = Request("departure1_2")
				if (departure12 = "") then
					departure12 = ""
				end if
				
				arrival22 = Request("arrival2_2")
				if (arrival22 = "") then
					arrival22 = ""
				end if
				
				departure22 = Request("departure2_2")
				if (departure22 = "") then
					departure22 = ""
				end if
				
				arrivalOri12 = Request("arrivalOri1_2")
				departureOri12 = Request("departureOri1_2")
				arrivalOri22 = Request("arrivalOri2_2")
				departureOri22 = Request("departureOri2_2")
				
				if ((arrival12 <> arrivalOri12 or departure12 <> departureOri12) and arrival22 = arrivalOri22 and departure22 = departureOri22) then
					travel2changed = 1
				elseif ((arrival12 = arrivalOri12 and departure12 = departureOri12) and (arrival22 <> arrivalOri22 or departure22 <> departureOri22)) then
					travel2changed = 2
				elseif ((arrival12 <> arrivalOri12 or departure12 <> departureOri12) and (arrival22 <> arrivalOri22 or departure22 <> departureOri22)) then
					travel2changed = 3
				else 
					travel2changed = 0
				end if
				
				totalNumberGuests2 = Request("NumeroTotaldeInvitados_2")
				namesOfChaperones2 = Request("NombresdeAcompanantes_2")
				roomDetail2 = Request("DetallesdeHabitacion_2")
				actividades2 = Request("Actividades_2")
				numberChildren2 = Request("NumerodeNinos_2")
				travelID2 = Request("travelID_2")
			end if

			Set arrival1_2 = oCmd.CreateParameter("@arrival1_2", 200,1,100,arrival12)
			oCmd.Parameters.Append arrival1_2
			
			Set departure1_2 = oCmd.CreateParameter("@departure1_2", 200,1,100,departure12)
			oCmd.Parameters.Append departure1_2
			
			Set arrival2_2 = oCmd.CreateParameter("@arrival2_2", 200,1,100,arrival22)
			oCmd.Parameters.Append arrival2_2
			
			Set departure2_2 = oCmd.CreateParameter("@departure2_2", 200,1,100,departure22)
			oCmd.Parameters.Append departure2_2
			
			Set totalNumberGuests_2 = oCmd.CreateParameter("@totalNumberGuests_2", 3,1,100,totalNumberGuests2)
			oCmd.Parameters.Append totalNumberGuests_2

			Set namesOfChaperones_2 = oCmd.CreateParameter("@namesOfChaperones_2", 200,1,100,namesOfChaperones2)
			oCmd.Parameters.Append namesOfChaperones_2
			
			Set roomDetail_2 = oCmd.CreateParameter("@roomDetail_2", 200,1,100,roomDetail2)
			oCmd.Parameters.Append roomDetail_2
			
			Set actividades_2 = oCmd.CreateParameter("@actividades_2", 200,1,100,actividades2)
			oCmd.Parameters.Append actividades_2
			
			Set numberChildren_2 = oCmd.CreateParameter("@numberChildren_2", 3,1,100,numberChildren2)
			oCmd.Parameters.Append numberChildren_2
			
			Set travelID_2 = oCmd.CreateParameter("@travelID_2", 200,1,100,travelID2)
			oCmd.Parameters.Append travelID_2
			
			Set travelID_2_checkChanged = oCmd.CreateParameter("@travelID_2_checkChanged", 3,1,100,travel2changed)
			oCmd.Parameters.Append travelID_2_checkChanged
			
			
			' ********************
			' Travels 3
			' **********************
			
			Dim arrival13,departure13,arrival23,departure23,totalNumberGuests3,namesOfChaperones3,roomDetail3,actividades3,numberChildren3,travelID3
			
			IF (Request("travelID_3") = "") Then 
				arrival13 = ""
				departure13 = ""
				arrival23 = ""
				departure23 = ""
				totalNumberGuests3 = 0
				namesOfChaperones3 = ""
				roomDetail3 = ""
				actividades3 = ""
				numberChildren3 = 0
				travelID3 = ""
				travel3changed = 0
			else 
				arrival13 = Request("arrival1_3")
				if (arrival13 = "") then
					arrival13 = ""
				end if
				
				departure13 = Request("departure1_3")
				if (departure13 = "") then
					departure13 = ""
				end if
				
				arrival23 = Request("arrival2_3")
				if (arrival23 = "") then
					arrival23 = ""
				end if
				
				departure23 = Request("departure2_3")
				if (departure23 = "") then
					departure23 = ""
				end if
				
				arrivalOri13 = Request("arrivalOri1_3")
				departureOri13 = Request("departureOri1_3")
				arrivalOri23 = Request("arrivalOri2_3")
				departureOri23 = Request("departureOri2_3")
				
				if ((arrival13 <> arrivalOri13 or departure13 <> departureOri13) and arrival23 = arrivalOri23 and departure23 = departureOri23) then
					travel3changed = 1
				elseif ((arrival13 = arrivalOri13 and departure13 = departureOri13) and (arrival23 <> arrivalOri23 or departure23 <> departureOri23)) then
					travel3changed = 2
				elseif ((arrival13 <> arrivalOri13 or departure13 <> departureOri13) and (arrival23 <> arrivalOri23 or departure23 <> departureOri23)) then
					travel3changed = 3
				else 
					travel3changed = 0
				end if
				
				totalNumberGuests3 = Request("NumeroTotaldeInvitados_3")
				namesOfChaperones3 = Request("NombresdeAcompanantes_3")
				roomDetail3 = Request("DetallesdeHabitacion_3")
				actividades3 = Request("Actividades_3")
				numberChildren3= Request("NumerodeNinos_3")
				travelID3 = Request("travelID_3")
			end if
			
			Set arrival1_3 = oCmd.CreateParameter("@arrival1_3", 200,1,100,arrival13)
			oCmd.Parameters.Append arrival1_3
			
			Set departure1_3 = oCmd.CreateParameter("@departure1_3", 200,1,100,departure13)
			oCmd.Parameters.Append departure1_3
			
			Set arrival2_3 = oCmd.CreateParameter("@arrival2_3", 200,1,100,arrival23)
			oCmd.Parameters.Append arrival2_3
			
			Set departure2_3 = oCmd.CreateParameter("@departure2_3", 200,1,100,departure23)
			oCmd.Parameters.Append departure2_3
			
			Set totalNumberGuests_3 = oCmd.CreateParameter("@totalNumberGuests_3", 3,1,100,totalNumberGuests3)
			oCmd.Parameters.Append totalNumberGuests_3
			
			Set namesOfChaperones_3 = oCmd.CreateParameter("@namesOfChaperones_3", 200,1,100,namesOfChaperones3)
			oCmd.Parameters.Append namesOfChaperones_3
			
			Set roomDetail_3 = oCmd.CreateParameter("@roomDetail_3", 200,1,100,roomDetail3)
			oCmd.Parameters.Append roomDetail_3
			
			Set actividades_3 = oCmd.CreateParameter("@actividades_3", 200,1,100,actividades3)
			oCmd.Parameters.Append actividades_3
			
			Set numberChildren_3 = oCmd.CreateParameter("@numberChildren_3", 3,1,100,numberChildren3)
			oCmd.Parameters.Append numberChildren_3
			
			Set travelID_3 = oCmd.CreateParameter("@travelID_3", 200,1,100,travelID3)
			oCmd.Parameters.Append travelID_3
			
			Set travelID_3_checkChanged = oCmd.CreateParameter("@travelID_3_checkChanged", 3,1,100,travel3changed)
			oCmd.Parameters.Append travelID_3_checkChanged
			
			' ********************
			' Travels 4
			' **********************
			
			Dim arrival14,departure14,arrival24,departure24,totalNumberGuests4,namesOfChaperones4,roomDetail4,actividades4,numberChildren4,travelID4
			
			IF (Request("travelID_4") = "") Then 
				arrival14 = ""
				departure14 = ""
				arrival24 = ""
				departure24 = ""
				totalNumberGuests4 = 0
				namesOfChaperones4 = ""
				roomDetail4 = ""
				actividades4 = ""
				numberChildren4 = 0
				travelID4 = ""
				travel4changed = 0
			else 
				arrival14 = Request("arrival1_4")
				if (arrival14 = "") then
					arrival14 = ""
				end if
				
				departure14 = Request("departure1_4")
				if (departure14 = "") then
					departure14 = ""
				end if
				
				arrival24 = Request("arrival2_4")
				if (arrival24 = "") then
					arrival24 = ""
				end if
				
				departure24 = Request("departure2_4")
				if (departure24 = "") then
					departure24 = ""
				end if
				
				arrivalOri14 = Request("arrivalOri1_4")
				departureOri14 = Request("departureOri1_4")
				arrivalOri24 = Request("arrivalOri2_4")
				departureOri24 = Request("departureOri2_4")
				
				if ((arrival14 <> arrivalOri14 or departure14 <> departureOri14) and arrival24 = arrivalOri24 and departure24 = departureOri24) then
					travel4changed = 1
				elseif ((arrival14 = arrivalOri14 and departure14 = departureOri14) and (arrival24 <> arrivalOri24 or departure24 <> departureOri24)) then
					travel4changed = 2
				elseif ((arrival14 <> arrivalOri14 or departure14 <> departureOri14) and (arrival24 <> arrivalOri24 or departure24 <> departureOri24)) then
					travel4changed = 3
				else 
					travel4changed = 0
				end if
				
				totalNumberGuests4 = Request("NumeroTotaldeInvitados_4")
				namesOfChaperones4 = Request("NombresdeAcompanantes_4")
				roomDetail4 = Request("DetallesdeHabitacion_4")
				actividades4 = Request("Actividades_4")
				numberChildren4= Request("NumerodeNinos_4")
				travelID4 = Request("travelID_4")
			end if
			
			Set arrival1_4 = oCmd.CreateParameter("@arrival1_4", 200,1,100,arrival14)
			oCmd.Parameters.Append arrival1_4
			
			Set departure1_4 = oCmd.CreateParameter("@departure1_4", 200,1,100,departure14)
			oCmd.Parameters.Append departure1_4
			
			Set arrival2_4= oCmd.CreateParameter("@arrival2_4", 200,1,100,arrival24)
			oCmd.Parameters.Append arrival2_4
			
			Set departure2_4 = oCmd.CreateParameter("@departure2_4", 200,1,100,departure24)
			oCmd.Parameters.Append departure2_4
			
			Set totalNumberGuests_4 = oCmd.CreateParameter("@totalNumberGuests_4", 3,1,100,totalNumberGuests4)
			oCmd.Parameters.Append totalNumberGuests_4
			
			Set namesOfChaperones_4 = oCmd.CreateParameter("@namesOfChaperones_4", 200,1,100,namesOfChaperones4)
			oCmd.Parameters.Append namesOfChaperones_4
			
			Set roomDetail_4 = oCmd.CreateParameter("@roomDetail_4", 200,1,100,roomDetail4)
			oCmd.Parameters.Append roomDetail_4
			
			Set actividades_4 = oCmd.CreateParameter("@actividades_4", 200,1,100,actividades4)
			oCmd.Parameters.Append actividades_4
			
			Set numberChildren_4 = oCmd.CreateParameter("@numberChildren_4", 3,1,100,numberChildren4)
			oCmd.Parameters.Append numberChildren_4
			
			Set travelID_4 = oCmd.CreateParameter("@travelID_4", 200,1,100,travelID4)
			oCmd.Parameters.Append travelID_4
			
			Set travelID_4_checkChanged = oCmd.CreateParameter("@travelID_4_checkChanged", 3,1,100,travel4changed)
			oCmd.Parameters.Append travelID_4_checkChanged
			
			' ********************
			' Credits
			
			Set NombreCredito = oCmd.CreateParameter("@NombreCredito", 200,1,100,encryptNombreCard)
			oCmd.Parameters.Append NombreCredito
			
			Set Tipo = oCmd.CreateParameter("@Tipo", 200,1,100,encryptTipo)
			oCmd.Parameters.Append Tipo
			
			Set NumeroDeTarjeta = oCmd.CreateParameter("@NumeroDeTarjeta", 200,1,100,encryptNumerodeTarjetaCard)
			oCmd.Parameters.Append NumeroDeTarjeta
			
			Set Address1_billing = oCmd.CreateParameter("@Address1_billing", 200,1,100,Request("Direccion1_billing"))
			oCmd.Parameters.Append Address1_billing
			
			Set Address2_billing = oCmd.CreateParameter("@Address2_billing", 200,1,100,Request("Direccion2_billing"))
			oCmd.Parameters.Append Address2_billing
			
			Set City_billing = oCmd.CreateParameter("@City_billing", 200,1,100,Request("Ciudad_billing"))
			oCmd.Parameters.Append City_billing
			
			Set Country_billing = oCmd.CreateParameter("@Country_billing", 200,1,100,Request("Pais_billing"))
			oCmd.Parameters.Append Country_billing
			
			Set ZipCode_billing = oCmd.CreateParameter("@ZipCode_billing", 200,1,100,Request("Postal_billing"))
			oCmd.Parameters.Append ZipCode_billing
			
			Set Province_billing = oCmd.CreateParameter("@Province_billing", 200,1,100,Request("Stado_billing"))
			oCmd.Parameters.Append Province_billing
			
			Set FechaDeExpiracion = oCmd.CreateParameter("@FechaDeExpiracion", 200,1,100,Request("FechaDeExpiracion"))
			oCmd.Parameters.Append FechaDeExpiracion
			
			Set CodigoDeSeguridad = oCmd.CreateParameter("@CodigoDeSeguridad", 200,1,100,encryptCodigodeSeguridad)
			oCmd.Parameters.Append CodigoDeSeguridad
			
			Set guestID = oCmd.CreateParameter("@guestID", 3,1,100,Request("guestID"))
			oCmd.Parameters.Append guestID
			
			Set userId = oCmd.CreateParameter("@userId", 3,1,100,session("AdminId"))
			oCmd.Parameters.Append userId
			
			Set valueOfCheck = oCmd.CreateParameter("@valueOfCheckbox", 3,1,100,valueOfCheckbox)
			oCmd.Parameters.Append valueOfCheck
			
			Set changeStatus = oCmd.CreateParameter("@specialStatus", 3,1,100,Request("changeStatus"))
			oCmd.Parameters.Append changeStatus
			
			Set reser = oCmd.CreateParameter("@reservation", 200,1,100,reservation)
			oCmd.Parameters.Append reser
			
		set rss = oCmd.execute
		
		' ==========================================================================
		
			' *******************************************
			' Area add new travel for guest
			'**********************************************
		
		' ==========================================================================
	
		Set oCmd1 = Server.CreateObject("ADODB.Command")
		  
		    oCmd1.ActiveConnection = objConnect
			oCmd1.CommandText = "sp_add_new_Travel_InGuestProfile" 
			oCmd1.CommandType = 4
			
		
		' ********************
		' Extra Noches 1
		' **********************
		
		Set habitacion_divA = oCmd1.CreateParameter("@roomSize_divA", 200,1,100,Request("Habitacion_divA"))
		oCmd1.Parameters.Append habitacion_divA
		
		Set arrival1_divA = oCmd1.CreateParameter("@arrivalDate1_divA", 200,1,100,Request("arrival1_divA"))
		oCmd1.Parameters.Append arrival1_divA
		
		Set departure1_divA = oCmd1.CreateParameter("@departureDate1_divA", 200,1,100,Request("departure1_divA"))
		oCmd1.Parameters.Append departure1_divA
		
		Set arrival2_divA = oCmd1.CreateParameter("@arrivalDate2_divA", 200,1,100,Request("arrival2_divA"))
		oCmd1.Parameters.Append arrival2_divA
		
		Set departure2_divA = oCmd1.CreateParameter("@departureDate2_divA", 200,1,100,Request("departure2_divA"))
		oCmd1.Parameters.Append departure2_divA
		
		Set totalNumberGuests_divA = oCmd1.CreateParameter("@totalNumberGuests_divA", 3,1,100,Request("NumeroTotaldeInvitados_divA"))
		oCmd1.Parameters.Append totalNumberGuests_divA

		Set namesOfChaperones_divA = oCmd1.CreateParameter("@namesOfChaperones_divA", 200,1,100,Request("NombresdeAcompanantes_divA"))
		oCmd1.Parameters.Append namesOfChaperones_divA
		
		Set roomDetail_divA = oCmd1.CreateParameter("@roomDetail_divA", 200,1,100,Request("DetallesdeHabitacion_divA"))
		oCmd1.Parameters.Append roomDetail_divA
		
		Set actividades_divA = oCmd1.CreateParameter("@activitiesOnTravel_divA", 200,1,100,Request("Actividades_divA"))
		oCmd1.Parameters.Append actividades_divA
		
		Set numberChildren_divA = oCmd1.CreateParameter("@numberChildren_divA", 3,1,100,Request("NumerodeNinos_divA"))
		oCmd1.Parameters.Append numberChildren_divA

		
		' ********************
		' Extra Noches 2
		' **********************
		
		Set habitacion_divB = oCmd1.CreateParameter("@roomSize_divB", 200,1,100,Request("Habitacion_divB"))
		oCmd1.Parameters.Append habitacion_divB
		
		Set arrival1_divB = oCmd1.CreateParameter("@arrivalDate1_divB", 200,1,100,Request("arrival1_divB"))
		oCmd1.Parameters.Append arrival1_divB
		
		Set departure1_divB = oCmd1.CreateParameter("@departureDate1_divB", 200,1,100,Request("departure1_divB"))
		oCmd1.Parameters.Append departure1_divB
		
		Set arrival2_divB = oCmd1.CreateParameter("@arrivalDate2_divB", 200,1,100,Request("arrival2_divB"))
		oCmd1.Parameters.Append arrival2_divB
		
		Set departure2_divB = oCmd1.CreateParameter("@departureDate2_divB", 200,1,100,Request("departure2_divB"))
		oCmd1.Parameters.Append departure2_divB
		
		Set totalNumberGuests_divB = oCmd1.CreateParameter("@totalNumberGuests_divB", 3,1,100,Request("NumeroTotaldeInvitados_divB"))
		oCmd1.Parameters.Append totalNumberGuests_divB

		Set namesOfChaperones_divB = oCmd1.CreateParameter("@namesOfChaperones_divB", 200,1,100,Request("NombresdeAcompanantes_divB"))
		oCmd1.Parameters.Append namesOfChaperones_divB
		
		Set roomDetail_divB = oCmd1.CreateParameter("@roomDetail_divB", 200,1,100,Request("DetallesdeHabitacion_divB"))
		oCmd1.Parameters.Append roomDetail_divB
		
		Set actividades_divB = oCmd1.CreateParameter("@activitiesOnTravel_divB", 200,1,100,Request("Actividades_divB"))
		oCmd1.Parameters.Append actividades_divB
		
		Set numberChildren_divB = oCmd1.CreateParameter("@numberChildren_divB", 3,1,100,Request("NumerodeNinos_divB"))
		oCmd1.Parameters.Append numberChildren_divB
		
		
		' ********************
		' END Extra Noches 2
		' **********************
		
		' ********************
		' Extra Noches 3
		' **********************
		
		Set habitacion_divC = oCmd1.CreateParameter("@roomSize_divC", 200,1,100,Request("Habitacion_divC"))
		oCmd1.Parameters.Append habitacion_divC
		
		Set arrival1_divC = oCmd1.CreateParameter("@arrivalDate1_divC", 200,1,100,Request("arrival1_divC"))
		oCmd1.Parameters.Append arrival1_divC
		
		Set departure1_divC = oCmd1.CreateParameter("@departureDate1_divC", 200,1,100,Request("departure1_divC"))
		oCmd1.Parameters.Append departure1_divC
		
		Set arrival2_divC = oCmd1.CreateParameter("@arrivalDate2_divC", 200,1,100,Request("arrival2_divC"))
		oCmd1.Parameters.Append arrival2_divC
		
		Set departure2_divC = oCmd1.CreateParameter("@departureDate2_divC", 200,1,100,Request("departure2_divC"))
		oCmd1.Parameters.Append departure2_divC
		
		Set totalNumberGuests_divC = oCmd1.CreateParameter("@totalNumberGuests_divC", 3,1,100,Request("NumeroTotaldeInvitados_divC"))
		oCmd1.Parameters.Append totalNumberGuests_divC
		
		Set namesOfChaperones_divC = oCmd1.CreateParameter("@namesOfChaperones_divC", 200,1,100,Request("NombresdeAcompanantes_divC"))
		oCmd1.Parameters.Append namesOfChaperones_divC
		
		Set roomDetail_divC = oCmd1.CreateParameter("@roomDetail_divC", 200,1,100,Request("DetallesdeHabitacion_divC"))
		oCmd1.Parameters.Append roomDetail_divC
		
		Set actividades_divC = oCmd1.CreateParameter("@activitiesOnTravel_divC", 200,1,100,Request("Actividades_divC"))
		oCmd1.Parameters.Append actividades_divC
		
		Set numberChildren_divC = oCmd1.CreateParameter("@numberChildren_divC", 3,1,100,Request("NumerodeNinos_divC"))
		oCmd1.Parameters.Append numberChildren_divC
		
		Set area_divA = oCmd1.CreateParameter("@area_divA", 3,1,100,Request("checked_divA"))
		oCmd1.Parameters.Append area_divA
		
		Set area_divB = oCmd1.CreateParameter("@area_divB", 3,1,100,Request("checked_divB"))
		oCmd1.Parameters.Append area_divB
		
		Set area_divC = oCmd1.CreateParameter("@area_divC", 3,1,100,Request("checked_divC"))
		oCmd1.Parameters.Append area_divC
	
		Set guestID = oCmd1.CreateParameter("@GuestID", 3,1,100,Request("guestID"))
		oCmd1.Parameters.Append guestID
		
		Set codeID = oCmd1.CreateParameter("@codeID", 3,1,100,Request("codeId"))
		oCmd1.Parameters.Append codeID
		
		set rss1 = oCmd1.execute
		
	Response.Redirect("admin-dashboard.asp")
%>
